﻿using System.Linq;
using System.Xml.Linq;
using TickSharp.Core.Infrastructure.Serializers;
using TickSharp.Tests.Properties;
using Xunit;

namespace TickSharp.Tests.IntegrationTests.Infrastructure
{
    public class ClientSerializerTester
    {
        [Fact]
        public void LoadFromClientXml()
        {
            var serializer = new ClientSerializer();

            var clientXml = XElement.Parse(SampleData.ClientXml);
            var result = serializer.Deserialize(clientXml).ToList();

            Assert.Equal(3, result.Count);

            Assert.Equal(12341, result[0].Id);
            Assert.Equal("Starfleet Command", result[0].Name);
        }
    }
}